<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCompaniesTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		//
        Schema::create('companies', function($table)
        {
            $table->increments('id');
            $table->tinyInteger('user_id');
            $table->string('name', 255);
            $table->string('email', 255)->nullable();
            $table->integer('province_id');
            $table->string('address', 512);
            $table->string('cell_phone', 20);
            $table->string('fax', 20)->nullable();
            $table->string('website', 20)->nullable();
            $table->text('description');
            $table->string('scale', 255);
            $table->integer('logo')->nullable();
            $table->integer('jobs_number')->nullable();
            $table->integer('rates_number')->nullable();
            $table->integer('reports_number')->nullable();
            $table->tinyInteger('status');
            $table->timestamps();
            $table->tinyInteger('is_deleted');
        });
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		//
		Schema::drop('companies');
	}

}
